





//
//  FFOssUploadTool.m
//  fitness-iOS
//
//  Created by 卢仕彤 on 2018/1/3.
//  Copyright © 2018年 卢仕彤. All rights reserved.
//

#import "FFOssUploadTool.h"
#import <AliyunOSSiOS/OSSService.h>
#import <UIKit/UIKit.h>
#import "FFCache.h"
@interface FFOssUploadTool ()

@property (nonatomic, copy) NSString * endPoint;
@property (nonatomic, copy) NSString * bucket;

@end

@implementation FFOssUploadTool


+ (NSString *)get_ts {
    return [NSString stringWithFormat:@"%ld", time(NULL)];
}

- (void)uploadImageWithList:(NSArray *)imgList succeed:(void (^)(NSArray * imgName))success failure:(void (^)(NSError *error))failure{
    
    _endPoint = @"";
    _bucket = @"";
    
}
#pragma -mark ------------------图片的相关处理----------------------

- (NSMutableArray *)imageToData:(NSArray *) imglist {
    NSMutableArray * img_data_list = [[NSMutableArray alloc] init];
    for (int i = 0; i < [imglist count]; i++) {
        NSData * data = UIImagePNGRepresentation(imglist[i]);
        [img_data_list addObject:data];
    }
    
    return img_data_list;
}

+ (instancetype)SharedInstance {
    static FFOssUploadTool *sharedManager;
    
    static dispatch_once_t onceToken;
    
    dispatch_once(&onceToken, ^{
        sharedManager = [[FFOssUploadTool alloc] init];
    });
    return sharedManager;
}

@end
